<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><fmt:message key="noticeInfoList.title"/></title>

<script src="<c:url value='/scripts/common.js'/>"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/css.css'/>" />
</head>

<body>
<html:form action="noticeInfo">
<table width="99%" border="0" cellspacing="0" cellpadding="0" align=center>
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="31" class="titlebgcolor">
        <table width="189" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="11">&nbsp;</td>
            <td width="26"><img src="images/passenger.gif" width="21" height="22" /></td>
            <td width="152"><fmt:message key="noticeInfoList.heading"/></td>
          </tr>
        </table>
        </td>
      </tr>
    </table></td>
  </tr>

  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="30" align="right" background="images/list_title_bg.jpg">
	    <table width="100%" height="18" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="10" align="left" valign="bottom" class="black12">&nbsp;</td>
                 <td  valign="bottom" class="black12">
                     <input type="button" style="margin-right: 5px" 
                     	class="textarea"
        		onclick="location.href='<c:url value="/noticeInfo.html?method=edit"/>'"
        		value="<fmt:message key="button.add"/>"
        		<p:notAllow pid="6481"> 
        			disabled
        		</p:notAllow>
        		/>
        	 <input type="button" style="margin-right: 5px" 
                     	class="textarea"
        		onclick="doMultiSelect('checkbox2')"
        		value="<fmt:message key="button.delete"/>" 
		 		<p:notAllow pid="6483"> 
        			disabled
        		</p:notAllow>
        		/>
          		</td>
			<td><sasis:page items="${noticeInfoList}"/></td>
              </tr>
            </table></td>
            <td width="6" align="right" valign="top"><img src="images/list_title_right.jpg" width="6" height="30" /></td>
          </tr>
        </table></td>
     </tr>
      <tr>
        <td align="left" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width1="98%" align="left" valign="top" class="list_area_bg">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="1%" align="left" valign="top">&nbsp;</td>
                <td width="99%" align="left" valign="top"> 
                <table width="100%" border="1" cellpadding="0" cellspacing="0" class="list_bordercolor"> 
                    <tr>
                      <td class="list_title_bottom"><input type="checkbox" name="checkbox" value="checkbox" onclick='checkAll(this.checked,"checkbox2");' /></td>
                      	<td class="list_font_title">&nbsp;<fmt:message key="noticeInfoForm.id"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="noticeInfoForm.planId"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="noticeInfoForm.startDate"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="noticeInfoForm.guestName"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="noticeInfoForm.guestTel"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="noticeInfoForm.noticeContent"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="noticeInfoForm.noticeStatus"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="noticeInfoForm.noticeTime"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="noticeInfoForm.memo"/></td>
					<p:allow pid="6482">                      
				      <td class="list_font_title" width="50">&nbsp;<fmt:message key="button.edit"/></td>		   				 
                    </p:allow>
				      <td class="list_font_title"  width="50">&nbsp;<fmt:message key="button.view"/></td>		   				 

                    </tr>
		<c:forEach var="results" items="${noticeInfoList}" varStatus="status">
                    <tr>
                      <td><span class="list_title_bottom">
                        <input type="checkbox" name="checkbox2" value="<c:out value='${results.id}'/>" />
                      </span></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.id}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.planId}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.startDate}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.guestName}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.guestTel}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.noticeContent}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.noticeStatus}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.noticeTime}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.memo}"/></td>
	    	<p:allow pid="6482">
		    <td class="list_font_area" width="50">
		    	<img src="./images/edit.gif" width="14" height="14" style="cursor:hand"  alt="<fmt:message key="button.edit"/>" onClick="window.location='./noticeInfo.html?method=edit&id=<c:out value="${results.id}"/>'">&nbsp;
		    </td>
		    </p:allow>
		    <td class="list_font_area" width="50">
		    	<img src="./images/view.gif" width="14" height="14" style="cursor:hand"  alt="<fmt:message key="button.view"/>"  onClick="MM_openBrWindow('./noticeInfo.html?method=view&id=<c:out value="${results.id}"/>','','width=500,height=400')">&nbsp;
		    </td>
                    </tr>
		</c:forEach> 
                </table>
                </td>
              </tr>
            </table>
            </td>
            <td width="8" align="left" valign1="top" background="images/list_area_right.jpg">&nbsp;</td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="4" align="left" valign="top"><img src="images/list_bottom_left.jpg" width="4" height="8" /></td>
            <td align="left" valign="top"><img src="images/list_bottom_middle.jpg" width="100%" height="8" /></td>
            <td width="6" align="right" valign="top"><img src="images/list_bottom_right.jpg" width="6" height="8" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<input type="hidden" name="ary"/>
</html:form>
</body>
<script>
//written by kellen 07-04-19
function doMultiSelect(chkName){
		var selected = new Array(); 
		var val = "";	  
		   for (var i=0;i < document.forms[0].elements.length; i++){
				var e = document.forms[0].elements[i]; 
				if (e.name==chkName){
					var chk = document.forms[0].elements[i];
					if(chk.checked){
						var bb = e.value; 
					    	selected.push(bb);
					} 
				}	 
			}	

 		if(0!=selected){
 			if(confirm("<fmt:message key="common.confirm.message"/>")){ 
	 			document.forms[0].ary.value=selected;  
				document.forms[0].method="post";
				document.forms[0].action="./noticeInfo.html?method=delete";
				document.forms[0].submit();
			}else return;	  			
		}else{
			alert("<fmt:message key="common.delete.message"/>");
		}	 
	}
</script>
</html>